package com.github.tvbox.osc.bean;

import android.text.TextUtils;

import com.github.tvbox.osc.util.Utils;

import java.util.Date;

public class Weather {
    private String date;
    private String code;
    private String desc;
    private String icon;
    private String max;
    private String min;

    private String direction;

    private String directionDesc;

    private String speed;

    private String speedDesc;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getMax() {
        return max;
    }

    public void setMax(String max) {
        this.max = max;
    }

    public String getMin() {
        return min;
    }

    public void setMin(String min) {
        this.min = min;
    }

    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }

    public String getDirectionDesc() {
        return directionDesc;
    }

    public void setDirectionDesc(String directionDesc) {
        this.directionDesc = directionDesc;
    }

    public String getSpeed() {
        return speed;
    }

    public void setSpeed(String speed) {
        this.speed = speed;
    }

    public String getSpeedDesc() {
        return speedDesc;
    }

    public void setSpeedDesc(String speedDesc) {
        this.speedDesc = speedDesc;
    }

    /**
     * 获取月份和日期
     * 格式 MM/dd
     * @return
     */
    public String getMD() {
        if(TextUtils.isEmpty(date)){
            return "";
        }
        return Utils.getSpecifiedFormatTime(Utils.getDateFromStandardTime(date,"yyyy-MM-dd"),"MM/dd");
    }
}
